// @ts-expect-error defineFakeRoute
import { defineFakeRoute } from "vite-plugin-fake-server/client";

export default defineFakeRoute([
  {
    url: "/user",
    method: "get",
    response: () => {
      return {
        code: 200,
        message: "success",
        data: {
          permissions: ["system:user:add", "system:user:edit", "system:user:delete"],
          roles: ["admin"],
          userInfo: {
            userId: 1,
            name: "花东红",
            avatar: "https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp"
          }
        }
      };
    }
  }
]);
